Ladders anyone?
by Badguy · in Torque Game Engine · 04/28/2002 (1:13 am) · 45 replies
Ok I need a Ladder.
what Ive got is simply use a bounding box via SceneObject,
set some properties for surface type settings.
save out the scale and rotations. thus simply allowing a wrap on anything to turn it climbable
certian surfaces can call certian animations or whatever.
I havent decided yet exactly what to do about the player.
Ill get there when I do :)
Im thinking so far flag him as climbing..
and handle it there. using the box.
or Better maybe to just use an ObjectType (LadderObjectType) and perform some case specific code in his end.(im trying this one first)
thoughts?
what Ive got is simply use a bounding box via SceneObject,
set some properties for surface type settings.
save out the scale and rotations. thus simply allowing a wrap on anything to turn it climbable
certian surfaces can call certian animations or whatever.
I havent decided yet exactly what to do about the player.
Ill get there when I do :)
Im thinking so far flag him as climbing..
and handle it there. using the box.
or Better maybe to just use an ObjectType (LadderObjectType) and perform some case specific code in his end.(im trying this one first)
thoughts?
About the author
#22
SO, I have this working now. I place a lifter object at the base of my ladder, the user collides with it, mounts it, goes up when you are pressing up, down when you are pressing down. I have dismount logic too, but I am going to play around with this some more to get it right.
05/13/2003 (6:38 am)
Okay, badguy didn't send the code so I talked to Mark Harmon about how I might go about implementing ladders and elevators. He suggested a "Lifter" object that the user mounts to that takes him up and down. This last weekend I copied the vehicle class and stripped it down to the bare minimum. I renamed this class Lifter and clamped all movement in the x and y direction. I also remapped y motion to z motion. I also have collision code that won't allow the user to pass through areas he shouldn't.SO, I have this working now. I place a lifter object at the base of my ladder, the user collides with it, mounts it, goes up when you are pressing up, down when you are pressing down. I have dismount logic too, but I am going to play around with this some more to get it right.
#23
:(
I didnt forget but I spread myself out to thin.
your idea seems ok. not quite All the control I wanted to see on a ladder but it will def do better than lots of games ive played :)
05/13/2003 (8:42 am)
sorry guys i got Real tied up this weekend with other obligations :(
I didnt forget but I spread myself out to thin.
your idea seems ok. not quite All the control I wanted to see on a ladder but it will def do better than lots of games ive played :)
#24
05/13/2003 (12:33 pm)
Cool Kurt!
#25
I just got back from E3 in LA. Talking about pumping someone up!! WOW!!
Sounds like a great idea. I have not had very much time to look at this. If you don't mind could I take a look at it? I have to be able to implement ladders also. I would also share anything else I could come up with.
Thanks
05/16/2003 (6:01 pm)
Hey KurtI just got back from E3 in LA. Talking about pumping someone up!! WOW!!
Sounds like a great idea. I have not had very much time to look at this. If you don't mind could I take a look at it? I have to be able to implement ladders also. I would also share anything else I could come up with.
Thanks
#26
05/16/2003 (8:59 pm)
I am still kicking around the best way to dismount. i am leaning toward triggers. Once I have that figured out I would be glad to give you the code so that I could get some feedback. I also might take into consideration left and right movement so that if the user decides to dismount halfway up he can. I will keep you posted.
#28
Kurt
05/18/2003 (6:19 pm)
Okay, I am willing to give the lifter object to whoever wants it. I am kind of anxious to see how people will handle dismounting. Basically you will just have to add this object to the engine and then define the object data in script.Kurt
#29
Thanks Kurt!
05/18/2003 (7:04 pm)
Great! My email is jackie@powerzones.com or jackie@swris.com. If you could send it to me I will be more than happy to check it out and let you know what my thoughts.Thanks Kurt!
#30
ontop object to the lift.
When players enter the lift they just gain an upward/downward motion equal to the lift.
Also I noticed that staticshapes moving up or down slow enough will adjust the players height ontop without any extra code.
But anyway.. wouldn't a simple jump create sufficient dismount ability?..
05/19/2003 (4:03 am)
I think bassically it shouldn't be nessesary to mount players to the lift but rather put an trigger at the top of the lift and include a special When players enter the lift they just gain an upward/downward motion equal to the lift.
Also I noticed that staticshapes moving up or down slow enough will adjust the players height ontop without any extra code.
But anyway.. wouldn't a simple jump create sufficient dismount ability?..
#31
06/06/2003 (10:23 am)
Okay, I have finished the lifter object. It is basically tuned to be used for ladders but with some tweaking it could be used for elevators. I am using triggers on my ladders to dynamically create a lifter object, set the animation to climbimg, and play a dismount animation for when the user gets to the top. Looks really good. Sebastian is going a different route I think so you should have some choices in the future. If you want the object just let me know. Maybe I will create a resource if I get time. Don't know if this should become part of the engine or not.
#32
gilles[ANTI_SPAM]@lafbros.com
Of course delete [ANTI_SPAM] :)
Thanks !
06/06/2003 (6:49 pm)
Hi Kurt. I'm really curious to try this, please.gilles[ANTI_SPAM]@lafbros.com
Of course delete [ANTI_SPAM] :)
Thanks !
#33
jackie@powerzones.com
Thanks
06/06/2003 (6:57 pm)
Hey Kurt. I'd like to see your updates. I am working on some things right now but I am hoping to get to this by next week. I'll keep you posted.jackie@powerzones.com
Thanks
#35
:)
Kurt
06/07/2003 (6:14 am)
Sent the zip to you guys. I am going to upload it my site for those of you that might want it in the future.:)
Kurt
#36
Thanks mucho ! I'll try this tonight(family). A first look at it and it seems really well done. I'll give you feedback.
Gilles Jr
06/07/2003 (7:11 am)
Kurt,Thanks mucho ! I'll try this tonight(family
Gilles Jr
#37
The code will automatically start playing a climbing thread if you have one when a player is mounted. I need to add a climbing root animation for the case where you stop on the ladder. I am doing that this weekend. I might also add code that will allow for a left or right movement. Maybe just use a tolerance.
One other thing that really needs to be done is to expose more parameters to the console. Right now acceleration is hard coded.
Anyway enjoy!
Kurt
06/07/2003 (12:21 pm)
A couple of things. I use a transparent geosphere as my DTS lifter object. I model it very small. This seems to work very well. The code will automatically start playing a climbing thread if you have one when a player is mounted. I need to add a climbing root animation for the case where you stop on the ladder. I am doing that this weekend. I might also add code that will allow for a left or right movement. Maybe just use a tolerance.
One other thing that really needs to be done is to expose more parameters to the console. Right now acceleration is hard coded.
Anyway enjoy!
Kurt
#38
Got a link for us where to download it? ;)
thx a lot!
06/07/2003 (1:20 pm)
Kurt, sounds great! :)Got a link for us where to download it? ;)
thx a lot!
#39
Find the line:
This is where I am going into the default root animation (if you are not moving) which is not quite what you will want to do. You will want to create a root climbing animation. So you will have a climb animation and a root climb animation and , if you choose, a dismount animation for when the player dsimounts the ladder. Here's the link. If you improve upon it, let me know! ;P
Lifter zip
06/07/2003 (3:56 pm)
Fixed the problem where the player wasn't going into root climb animation when stopped on the ladder.Find the line:
if( m_player )
m_player->setActionThread( 0,false,false,false,false,false);This is where I am going into the default root animation (if you are not moving) which is not quite what you will want to do. You will want to create a root climbing animation. So you will have a climb animation and a root climb animation and , if you choose, a dismount animation for when the player dsimounts the ladder. Here's the link. If you improve upon it, let me know! ;P
Lifter zip
#40
This is working great. Really cool ! A new vehicle kinda, hehe. My actual project is vehicles only (car game) so I can't use it like it is but for FPS games, it's really usefull. I'm sure a ressource would be really of interest for the community. I will maybe try to make vehicle's elevator with it :) (I'll tell you if I do). Again, thanks mucho, nice one !
Gilles Jr
06/09/2003 (5:15 am)
Kurt,This is working great. Really cool ! A new vehicle kinda, hehe. My actual project is vehicles only (car game) so I can't use it like it is but for FPS games, it's really usefull. I'm sure a ressource would be really of interest for the community. I will maybe try to make vehicle's elevator with it :) (I'll tell you if I do). Again, thanks mucho, nice one !
Gilles Jr
Torque 3D Owner Jackie Hayes