|
|
C_Rotate (Reldist)
#219930
08/05/08 17:21
08/05/08 17:21
|
Joined: Jul 2008
Posts: 168
82RJZAE
OP
Member
|
OP
Member
Joined: Jul 2008
Posts: 168
|
C_rotate can be used to rotate an object, but it does not have any parameter to use if you want to rotate an object using reldist (relative distance).
USE_AXIS/R rotates VIA absdist (abstract distance or world co-ordinance) but there is none that rotates using reldist.
What can be done to use reldist co-ordinance instead?
Last edited by 82RJZAE; 08/06/08 16:50.
|
|
|
Re: C_Rotate (Reldist)
[Re: 82RJZAE]
#220193
08/06/08 11:37
08/06/08 11:37
|
Joined: Nov 2007
Posts: 1,032 Croatia
croman
Serious User
|
Serious User
Joined: Nov 2007
Posts: 1,032
Croatia
|
USE_AXIS - does not rotate about world coordinates, but about the entities' coordinate system.
that's what says in manual, so i think you got your answer
Ubi bene, ibi Patria.
|
|
|
Re: C_Rotate (Reldist)
[Re: 82RJZAE]
#220320
08/06/08 22:41
08/06/08 22:41
|
Joined: Nov 2007
Posts: 1,032 Croatia
croman
Serious User
|
Serious User
Joined: Nov 2007
Posts: 1,032
Croatia
|
it should work, it worked for me. what engine version do you have?
Ubi bene, ibi Patria.
|
|
|
Re: C_Rotate (Reldist)
[Re: croman]
#220333
08/07/08 00:06
08/07/08 00:06
|
Joined: Jul 2008
Posts: 168
82RJZAE
OP
Member
|
OP
Member
Joined: Jul 2008
Posts: 168
|
A7 Trial (7.10). SED Trial (7.06.1).
Maybe a version issue?
Last edited by 82RJZAE; 08/07/08 00:07.
|
|
|
Re: C_Rotate (Reldist)
[Re: 82RJZAE]
#220413
08/07/08 10:15
08/07/08 10:15
|
Joined: Nov 2007
Posts: 1,032 Croatia
croman
Serious User
|
Serious User
Joined: Nov 2007
Posts: 1,032
Croatia
|
hm...i cant tell if there's some kind of bug on 7.10 cause i have 7.07 and as i said it works on that version. maybe something with your code is wrong. can you post that part of your code here?
Ubi bene, ibi Patria.
|
|
|
Re: C_Rotate (Reldist)
[Re: croman]
#220614
08/07/08 19:02
08/07/08 19:02
|
Joined: Jul 2008
Posts: 168
82RJZAE
OP
Member
|
OP
Member
Joined: Jul 2008
Posts: 168
|
Alright, here's a small part of code:
...
function player1() {
...
ph_...(physics applied);
phent_(type and mass = PH_BOX);
while(1) {
if(key_w) {
phent_add...();
}
if(key_a) {
phent_enable(me, 0);
c_rotate(me, vector(time_step, 0, 0), USE_AXIS);
phent_enable(me, 1);
}
}
}
...
This allows the entity to advance forwards (dir x) but still moves the same direction even when it has rotated (not rotated by the reldist or Euler angles).
|
|
|
Re: C_Rotate (Reldist)
[Re: 82RJZAE]
#220632
08/07/08 22:20
08/07/08 22:20
|
Joined: Nov 2007
Posts: 1,032 Croatia
croman
Serious User
|
Serious User
Joined: Nov 2007
Posts: 1,032
Croatia
|
i think that phent_enable causes that. try using phent_settype( me, 0, 0 ); then use c_rotate and then reanable it with phent_settype( me, PH_RIGID, PH_...);
Ubi bene, ibi Patria.
|
|
|
Re: C_Rotate (Reldist)
[Re: croman]
#220642
08/07/08 23:36
08/07/08 23:36
|
Joined: Jul 2008
Posts: 168
82RJZAE
OP
Member
|
OP
Member
Joined: Jul 2008
Posts: 168
|
Not quite sure what you mean, but this also occurs when c_move is used. The entity is rotated by the Euler angles only when the reldist parameters are used in c_move.
"c_move(ENTITY* entity,VECTOR* reldist,VECTOR* absdist,var mode)"
Last edited by 82RJZAE; 08/07/08 23:37.
|
|
|
Re: C_Rotate (Reldist)
[Re: 82RJZAE]
#220644
08/07/08 23:51
08/07/08 23:51
|
Joined: Nov 2007
Posts: 1,032 Croatia
croman
Serious User
|
Serious User
Joined: Nov 2007
Posts: 1,032
Croatia
|
why dont you use reldist then?
Ubi bene, ibi Patria.
|
|
|
|