Player collision/animation question
by Gerald Fishel · in Torque Game Engine Advanced · 01/12/2009 (12:32 am) · 5 replies
Hi all,
Okay, I have some collideable scene objects that are animated. As a simple instance a door with an open and close animation.
Now if I try to walk through a doorway with the door closed, obviously I can't go through. Now when I open the door, I still cant go through. If I back up a little ways and then go forward again, now I can go through.
I'm assuming that the "Player" caches the collision convexes. Is there a way to force a refresh of this?
I see Player::updateWorkingCollisionSet(), and I tried setting updateSet = true right before it tests for it just to see if that worked, and this seems to now result in calls to the buildConvex method in my scene object, but it seems like it's still caching something because I still can't move through the doorway unless I back up a little bit first.
Note these are custom renderable types, not tsStatic or ShapeBase objects.
Any ideas on how to deal with this would be great.
Thanks,
Gerald
Okay, I have some collideable scene objects that are animated. As a simple instance a door with an open and close animation.
Now if I try to walk through a doorway with the door closed, obviously I can't go through. Now when I open the door, I still cant go through. If I back up a little ways and then go forward again, now I can go through.
I'm assuming that the "Player" caches the collision convexes. Is there a way to force a refresh of this?
I see Player::updateWorkingCollisionSet(), and I tried setting updateSet = true right before it tests for it just to see if that worked, and this seems to now result in calls to the buildConvex method in my scene object, but it seems like it's still caching something because I still can't move through the doorway unless I back up a little bit first.
Note these are custom renderable types, not tsStatic or ShapeBase objects.
Any ideas on how to deal with this would be great.
Thanks,
Gerald
#2
01/12/2009 (7:56 am)
You can disable the collision on open.
#3
01/12/2009 (1:52 pm)
Only if you no longer want to collide against the door while it's open. While theoretically that might be acceptable with doors, I need to work with many different types of interactive/movable objects, some of which definitely need to remain collideable when moved.
#4
Forgive me for my ignorance (I'm fairly new to the torque scene) but what function would be called on the completion of a given animation?
Better yet, is there an API where I could look this sort of stuff up? I've googled around a fair amount but come up with very little :(
Thanks in advance
01/12/2009 (3:45 pm)
I'm interested in persuing that route for a small project I've been working on actually.Forgive me for my ignorance (I'm fairly new to the torque scene) but what function would be called on the completion of a given animation?
Better yet, is there an API where I could look this sort of stuff up? I've googled around a fair amount but come up with very little :(
Thanks in advance
#5
01/12/2009 (3:59 pm)
I'm not especially familiar with the animation setup in TGEA; I'm doing my own animations with custom scene objects. But I think TGEA uses the concept of animation triggers so try searching the site and/or documentation for "animation triggers" or something like that.
Torque Owner Gerald Fishel
Development Ninja