Jump to content

Peds facing north while having other rotation


Puma

Recommended Posts

Just odd, the problem occured after I switched to 1.1. While the server was 1.0, all peds were rotated as they should. I updated the server to 1.1 and all peds face north. When I loop through all peds and output their rotation, I get rotations like 80, 90, 270 and 315, but still all peds are facing north.

This is my clientside script, maybe there's something that 1.0 can handle but 1.1 can't:

http://pastebin.com/pPWz40uZ

No errors or whatsoever btw. When I output the rotations, the rotation I gave to them in that script is output, so that isn't the problem. The problem, in short terms, is that they're facing north while having a different rotation that should not make them face north. I just don't get it, I hope one of you guys does and is able to help me with it :).

Link to comment

Got it fixed, but the way I did it is just stupid. For some reason the rotation you fill in at createPed doesn't matter, it always becomes 0 so they face north. After a ped spawns, you gotta give it the rotation using setElementRotation ( ped, 0, 0, rotation ), not setPedRotation ( ped, rotation ) as you would expect. But, when you need a ped's rotation, you gotta use getPedRotation ( ped ) and not getElementRotation ( ped ). What the hell 0.o? Doesn't make any sense if you ask me.

Link to comment

I had the same problem few days ago. In my script I made a ped and setPedRotation was not working. I also tried set ped rotation at the createPed line. setElementRotation command solved my problem.

But I would like to mention there is a part in my script that create a ped when you hit the Collision shape and setPedRotation is working in that part.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...