|
2 registered members (TipmyPip, 1 invisible),
15,756
guests, and 0
spiders. |
|
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: C_Rotate About Different Axis
[Re: 82RJZAE]
#406471
08/21/12 08:02
08/21/12 08:02
|
Joined: Jun 2007
Posts: 1,337 Hiporope and its pain
txesmi
Serious User
|
Serious User
Joined: Jun 2007
Posts: 1,337
Hiporope and its pain
|
here you go 
vec_set ( vtemp, vector ( key_force.y, -key_force.x, 0 ) );
vec_normalize ( vtemp, 15 * time_step );
c_move ( player, vtemp, nullvector, GLIDE );
vec_set ( camera.x, player.x );
camera.pan -= mickey.x * time_step * 3;
camera.tilt = clamp ( camera.tilt - ( mickey.y * time_step * 3 ), -80, 80 );
player.pan = camera.pan;
vec_for_angle ( vtemp, camera.pan );
vec_normalize ( vtemp, 50 );
vec_add ( vtemp, player.x );
vec_sub ( vtemp, Object.x );
c_move ( Object, nullvector, vtemp, GLIDE );
vec_diff ( vtemp, camera.pan, Object.pan );
c_rotate ( Object, vtemp, NULL );
Salud!
|
|
|
Re: C_Rotate About Different Axis
[Re: 82RJZAE]
#406655
08/27/12 04:33
08/27/12 04:33
|
Joined: Mar 2006
Posts: 3,538 WA, Australia
JibbSmart
Expert
|
Expert
Joined: Mar 2006
Posts: 3,538
WA, Australia
|
POLYGON can't help here, I'm afraid.
An entity with their POLYGON flag will be a per-polygon obstacle to other objects using c_move, but when it uses c_move it'll use an ellipsoid hull.
GS's collision detection options are extremely limited, unfortunately, and previous requests for improvements in this area were deemed too much work. You're better off somehow taking advantage of PhysX, or a collision-detection plugin, or writing your own collision detection, or settling for ellipsoids.
Formerly known as JulzMighty. I made KarBOOM!
|
|
|
|