AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Entity Rotating (https://forums.alliedmods.net/showthread.php?t=221385)

zekStein 07-21-2013 10:16

Entity Rotating
 
Hello there !
I need to rotate an entity around his origin to say like this ...

I don't want to rotate the 'entity', the 'model'( which is an entity made in VHE, for example a cilinder, or a box or a door ).

The rotation should be like an helicopter's propeller.

Can you help me ? I tried a lot of things with angles but .. nothing.

Thanks !

Arkshine 07-21-2013 10:43

Re: Entity Rotating
 
Not sure to fully understand, but to rotate an entity, generally you would use pev_avelocity.

Bos93 07-21-2013 10:55

Re: Entity Rotating
 
Quote:

Originally Posted by Arkshine (Post 1995690)
Not sure to fully understand, but to rotate an entity, generally you would use pev_avelocity.

nope,angles:

Example:

PHP Code:

    new Float:vAngle];

    
vAngle ] = 0.0;
    
vAngle ] += 1.0;
    
vAngle ] = 0.0;


    
entity_set_vectorpEntityEV_VEC_anglesvAngle ); 


zekStein 07-22-2013 11:07

Re: Entity Rotating
 
Quote:

Originally Posted by Arkshine (Post 1995690)
Not sure to fully understand, but to rotate an entity, generally you would use pev_avelocity.


If i use ANGLES, the entity rotates on a circle to say like that. It orbits an axis that isn't the middle of the entity to say like that.

I want to rotate the entity, to orbit around his origin.

I'll try pev_avelocity.

LE : With :

PHP Code:

public rotatePropellerid )
{
    new 
ePropeller[id];
    
    if( 
!= )
    {
        new 
Float:a[3];
        
pevipev_avelocity);
        
a[1] -= 1.0;
        
set_pevipev_avelocitya);
    }
    


= nothing.

Yes, with EV_VEC_angles it's rotating but the origin is changed with each += 1.0 ... i want to stay in that origin and just rotate with angle..

LE2 ; To explain better, il took the solar system.

For example : The earth is rotating around his axis.
But the earth is rotating too around the sun.

So : The rotation with EV_VEC_angles it's just like the Earth around the Sun. I just want to rotate the entity around his axis( like the Earth around his axis ).


All times are GMT -4. The time now is 06:30.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.