trueaxis.com Forum Index trueaxis.com
True Axis Physics SDK Forum
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Elevators

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    trueaxis.com Forum Index -> General Discussion
View previous topic :: View next topic  
Author Message
kurtz



Joined: 02 Apr 2005
Posts: 56

PostPosted: Tue Jun 21, 2005 1:43 pm    Post subject: Elevators Reply with quote

I was looking to implement mover type objects (like an elevator) that could move other objects, like a player around, but not be moved themselves. (I.e. an elevator could raise and lower other dynamic objects, but could not be hit off course by the player). I was wondering what people thought would be the best way to do this.

I got something sort of working by writing a PreCollisionCallBack function that adjusts the moved objects velocity manually and clears the mover object from the collision. I was wondering if there's a cleaner, better way to do this that anyone can think of. Thanks.
Back to top
View user's profile Send private message
luke
Site Admin


Joined: 15 Oct 2004
Posts: 621

PostPosted: Wed Jun 22, 2005 1:36 pm    Post subject: Reply with quote

You can try using a slider joint for elevators and make it heavy compared to the player to help stop it being knocked off course.

StaticObject has a SetNextFrame function. If you use a StaticObject for the elevator and call SetNextFrame to move it it will give exactly the result you are after. However, this is work in progress and is documented as such. There may be some issues but you can try it if you like. However, at this point, this is not optimized and doing many elevaters at once with static objects may be slow.

It might be possible to add a TA::DynamicObject::SetInfiniteMass() function to TrueAxis in the future to add this type of functionallity.

There is a workaround you might be able to do with PreCollisionCallBack if you are very advetures. It might work.
-You need to remove the moving object from the collision.
-If the moving object is ObjectA in the collision, you will have to make the other object ObjectA and flip v3Normal in the collisoin to point in the oppocite direction.
-Then you can set the fTime to 0.0 and increase fIntersectingDepth relative to how fast the lift is moving.
However, I this could only posibly work for very slow moving lifts.
Back to top
View user's profile Send private message Send e-mail
kurtz



Joined: 02 Apr 2005
Posts: 56

PostPosted: Wed Jun 22, 2005 1:57 pm    Post subject: Reply with quote

Thanks a lot. I wasn't sure what exactly to adjust to get the right behavior, but I'll try playing around with the intersecting depth a little, and see what happens.

Edit: Tried the SetNextFrame, which seems like it will probably be the best option at some point, but got a bunch of strange issues, so I'll hold off on that for now.
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    trueaxis.com Forum Index -> General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
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 vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group