Gamestudio Links
Zorro Links
Newest Posts
loading historical data 1st time
by AndrewAMD. 04/14/23 12:54
Trade at bar open
by juanex. 04/13/23 19:43
Bug in Highpass2 filter
by rki. 04/13/23 09:54
Adding Limit Orders For IB
by scatters. 04/11/23 16:16
FisherN
by rki. 04/11/23 08:38
AUM Magazine
Latest Screens
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Hecknex World
Who's Online Now
2 registered members (Quad, AndrewAMD), 1,007 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
rki, FranzIII, indonesiae, The_Judge, storrealba
18919 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
locked to world + rotation? #327101
06/04/10 15:32
06/04/10 15:32
Joined: Apr 2010
Posts: 47
D
Darkmatters Offline OP
Newbie
Darkmatters  Offline OP
Newbie
D

Joined: Apr 2010
Posts: 47
Hi all again,

I want to lock an object to the world, and use the following code...

{vec_set(obj_mdl.x,vector(x,y,z));vec_set(obj_mdl.pan,tubey.pan); vec_for_ent(obj_mdl.x,tubey);}

Which works fine.... but I also want to rotate it, with the following line, ot the obj rotates and turns with the world.

vec_add(obj_mdl.pan,vector(x,0,0));

Whic does NOT work....probably because the parameters are holding it in position??
So.... any ideas? apart from animation???


As usual, thanks in advance....
D.

Re: locked to world + rotation? [Re: Darkmatters] #327191
06/04/10 23:52
06/04/10 23:52
Joined: Apr 2006
Posts: 737
Ottawa, Canada
O
Ottawa Offline
User
Ottawa  Offline
User
O

Joined: Apr 2006
Posts: 737
Ottawa, Canada
Hi!

If you are trying to have the object rotate with the world
so that it appears not to move you have to
make the object follow the movement of the world

so (not code)
vec_set ( your object, world pan or position....)


Hope this helps!
Ottawa laugh

Ver 7.86.2 Pro and Lite-C

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

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