Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
4 registered members (TipmyPip, AndrewAMD, dBc, clonman), 18,621 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Problem with move/tilt/roll #433884
12/08/13 11:02
12/08/13 11:02
Joined: Apr 2008
Posts: 245
GameScore Offline OP
Member
GameScore  Offline OP
Member

Joined: Apr 2008
Posts: 245
Hey Hey laugh

i got a bit a problem to calculate how to crazy

i got a car entity and when the car accelerate/brake
it should tilt a bit,but when i change the tilt value
the car would change his direction a bit downward

how can i sub this downward direction?

Re: Problem with move/tilt/roll [Re: GameScore] #433893
12/08/13 15:15
12/08/13 15:15
Joined: Apr 2005
Posts: 1,988
Canadian, Eh
DLively Offline
Serious User
DLively  Offline
Serious User

Joined: Apr 2005
Posts: 1,988
Canadian, Eh
c_move(ENTITY* entity,VECTOR* reldist,VECTOR* absdist,var mode)

Use the absdist instead of reldist. This will move the entity along the word co-ordinates rather than its own. When you tilt the car it wont move in its tilt direction.

Hope this helps


A8 Pro 8.45.4
YouTube: Create Games For Free
Free Resources: www.CGForFree.com
Re: Problem with move/tilt/roll [Re: DLively] #433903
12/08/13 20:28
12/08/13 20:28
Joined: Apr 2008
Posts: 245
GameScore Offline OP
Member
GameScore  Offline OP
Member

Joined: Apr 2008
Posts: 245
lol, how easy
i forgot^^
thougt i must calcualte some strange mathematics grin


but now i have a another problem
when i turn the car left or rigt 180°
the buttons will be mirrored

i mean foward will be backward now^^

Last edited by GameScore; 12/08/13 20:38.
Re: Problem with move/tilt/roll [Re: GameScore] #434030
12/11/13 07:13
12/11/13 07:13
Joined: Jan 2006
Posts: 968
EpsiloN Offline
User
EpsiloN  Offline
User

Joined: Jan 2006
Posts: 968
In this case you have many options, but what I'd do is this:
Store the tilt of the car in a temporary local variable.
Set the tilt of the car to 0.
Move the car on relative movement.
Reset the tilt of the car to the local temporary variable that you stored.

This way the car will move forward and still be tilted in a direction, and you avoid the headache of using absolute movements laugh


Extensive Multiplayer tutorial:
http://mesetts.com/index.php?page=201

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1