Need help on resizing an object.
Basically I have a ball which have a radius that varies according to its y position. What's the correct way of resizing it?
I had little success in doing this. But when I add line segments to the collision space, it crashes. It crashes on the function cpShapeCacheBB and the shape was the circle.
Any help would be greatly appreciated.
Thanks
Resizing objects
-
- Posts: 5
- Joined: Mon Sep 08, 2008 4:46 am
- Contact:
- slembcke
- Site Admin
- Posts: 4166
- Joined: Tue Aug 14, 2007 7:13 pm
- Contact:
Re: Resizing objects
Chipmunk does not support resizing or changing the shape of objects on the fly.
You can do it by deleting and re-adding a new shape, but it will not act like real physics.
You can do it by deleting and re-adding a new shape, but it will not act like real physics.
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
-
- Posts: 5
- Joined: Mon Sep 08, 2008 4:46 am
- Contact:
Re: Resizing objects
Actually, that was what I've been doing. But when I add line segments to the space, it crashes on the function cpShapeCacheBB .
what could be causing this?
what could be causing this?
- slembcke
- Site Admin
- Posts: 4166
- Joined: Tue Aug 14, 2007 7:13 pm
- Contact:
Re: Resizing objects
The cpShapeCacheBB() crash would probably be due to a bad shape pointer, or a shape that you freed without removing from the space.
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
-
- Posts: 5
- Joined: Mon Sep 08, 2008 4:46 am
- Contact:
Re: Resizing objects
Thanks. Yup your right. I wasn't removing the shape from space before freeing it.
Thanks a bunch.
Thanks a bunch.
Who is online
Users browsing this forum: No registered users and 12 guests