Making the player tilt with terrain.
by Jacob Dankovchik · in Torque Game Engine · 07/28/2006 (10:56 am) · 11 replies
I'm currently working on a nifty little idea, just planning it out in my head. However to get this to work, I need to get the player to tilt with the terrain he stands on. This is the only thing I think will pose a problem for me.
To further describe, think of the car driving on the terrain. If it drives uphill, the body will tilt upward, same for down. But for the player, he stays perfectly vertical. Does anyone know how to change this to do what I need? Thanks!
To further describe, think of the car driving on the terrain. If it drives uphill, the body will tilt upward, same for down. But for the player, he stays perfectly vertical. Does anyone know how to change this to do what I need? Thanks!
About the author
#2
07/28/2006 (11:03 am)
This very question was asked as recently as last week, and Clark Fagot submitted a resource like 3 years ago that touches this mechanic.
#3
Clark Fagot? I cant see any resources in his profile like this
I think you got the wrong name
Do you mean Joe Maruschak?
07/28/2006 (11:21 am)
@ StefanClark Fagot? I cant see any resources in his profile like this
I think you got the wrong name
Do you mean Joe Maruschak?
#4
I'm tryin it now. Thanks for your help. Although when you help people, maybe be a little less fague... Telling them to search doesn't do any good, maybe give a hint of what to search FOR. I tried earlier and couldn't find anything, I had to switch some words around. So if you know the resource is out there for someone, give a suggestion of what they want to look for as well. ;)
07/28/2006 (11:31 am)
If any should look to this in the next few days with the question, here is the resource: www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=3148I'm tryin it now. Thanks for your help. Although when you help people, maybe be a little less fague... Telling them to search doesn't do any good, maybe give a hint of what to search FOR. I tried earlier and couldn't find anything, I had to switch some words around. So if you know the resource is out there for someone, give a suggestion of what they want to look for as well. ;)
#5
07/28/2006 (11:47 am)
How would you make the conformed player go right round a loop the loop like in Marble Blast or Sonic the Hedgehog?
#6
Search for "player tilt with terrain" (the title of this post) and look at the first resource listed.
07/28/2006 (12:13 pm)
Quote:Telling them to search doesn't do any good, maybe give a hint of what to search FOR
Search for "player tilt with terrain" (the title of this post) and look at the first resource listed.
#7
07/28/2006 (1:02 pm)
Given the way gravity and movement works by default, it's probably impossible to actually loop a player around even with the alignment code. You would need to modify their collision code to try and slide them along the normal of any surface. It might be as simple as removing the runSurface angle check, not sure though.
#8
Clark Fagot coded it, Joe submitted it. Can't see your point.
@Matt Luard:
In that case, I would definatly go for an animation rather than the real thing.
07/28/2006 (1:10 pm)
@James T.Clark Fagot coded it, Joe submitted it. Can't see your point.
@Matt Luard:
In that case, I would definatly go for an animation rather than the real thing.
#9
07/28/2006 (1:23 pm)
Didnt know Clark coded it
#10
07/28/2006 (1:59 pm)
We did it in MRC (the looping) but it was a bit of hack. Essentially we just cut off the gravity and "stuck" the player to the surface. If the velocity of the truck went below a certain threshold, we would turn gravity back on and unstick them. It ended up working pretty well. We also had a system for canned stunts where we would take over control completely. The designer would set a number of way points and assign position information to each point. At the start of the stunt, we would take control of the player and interpolate the position from way point to way point.
#11
07/28/2006 (11:57 pm)
Thanks Eric, Stefan and Paul, i'll give all those things a shot.
Torque 3D Owner Peter Simard
Default Studio Name