Gamestudio Links
Zorro Links
Newest Posts
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
4 registered members (degenerate_762, AbrahamR, AndrewAMD, ozgur), 667 guests, and 8 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 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 | chip programmers | 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