1 registered members (TipmyPip),
18,388
guests, and 6
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: Roll without changing my.z ...
[Re: 3run]
#367238
04/11/11 05:19
04/11/11 05:19
|
Joined: Jul 2009
Posts: 85
Altarius
OP
Junior Member
|
OP
Junior Member
Joined: Jul 2009
Posts: 85
|
Yes but i need to dont ignore PAN... so if use absolute vector that ignore all 3 angle.
Last edited by Altarius; 04/11/11 05:22.
|
|
|
Re: Roll without changing my.z ...
[Re: 3run]
#367251
04/11/11 10:54
04/11/11 10:54
|
Joined: Jul 2009
Posts: 85
Altarius
OP
Junior Member
|
OP
Junior Member
Joined: Jul 2009
Posts: 85
|
Can u show me a short exemple of what u talking about plz.
Last edited by Altarius; 04/11/11 10:54.
|
|
|
Re: Roll without changing my.z ...
[Re: 3run]
#367270
04/11/11 14:33
04/11/11 14:33
|
Joined: Mar 2006
Posts: 3,538 WA, Australia
JibbSmart
Expert
|
Expert
Joined: Mar 2006
Posts: 3,538
WA, Australia
|
I told you how to do it. Did you try it? If you want tilt to be used as well you just add in the tilt component:
c_move(my, nullvector, vec_rotate(speed, vector(my.pan, my.tilt, 0)), IGNORE_PASSABLE|GLIDE);
If you want to base it all on a different direction entirely (call it newDir, for example):
c_move(my, nullvector, vec_rotate(speed, newDir), IGNORE_PASSABLE|GLIDE);
newDir would be an ANGLE that points in the direction you want the entity to pretend it is facing when moving. Jibb
Formerly known as JulzMighty. I made KarBOOM!
|
|
|
Re: Roll without changing my.z ...
[Re: 3run]
#367285
04/11/11 15:05
04/11/11 15:05
|
Joined: Dec 2008
Posts: 1,660 North America
Redeemer
Serious User
|
Serious User
Joined: Dec 2008
Posts: 1,660
North America
|
To further elaborate on Jibb's post:
ANGLE* temp_ang;
VECTOR* speed;
// set the move direction and speed
vec_set( temp_ang, vector(my.pan,my.tilt,0) );
vec_set( speed, vector(10,0,0) );
c_move( my, nullvector, vec_rotate(speed,temp_ang), GLIDE );
|
|
|
|