Physics Simulation Forum


All times are UTC

Post new topic Reply to topic  [ 1 post ] 
Author Message
PostPosted: Sun Jun 03, 2012 6:24 pm 

Joined: Fri Dec 10, 2010 3:39 am
Posts: 20
I have a rigid body that I want the character to use as a weapon. It's a sword, so the character should swing it around and be able to interact with things while doing so. I have the basics set, I nullified gravity for it and set the origin and rotation based on where I want it to be. I'm experiencing a few issues though, and I was wondering if anyone had any thoughts.

First of all, right now my "character controller" is just a basic camera that can move straight through other objects. I have a ground plane for instance, and when I fly through it, I can look up and see that the sword is stuck along the plane. This is okay, but when I then fly back above the plane, the rigid body is stuck at the same offset way up above the camera! Furthermore, it seems to be gradually drifting upwards now. Is there a way to reset this so that it won't go haywire on the off chance that I try to set it's origin to an impossible physical location?

Second, I don't want the rigid body to absolutely wreck everything it comes in contact with. Right now to swing it, I just manually set it's rotation for each point in the swing. How can I get a more physically proper swing with gravity turned off? I'd like to have the sword knock over boxes, but bounce off of stone walls. I thought of setting a collision callback, but then I'd have to manually simulate the rebound. This isn't too terrible, but does anyone have any ideas for a better way to swing it?

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC

Who is online

Users browsing this forum: No registered users and 7 guests

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group