Jump to content

Rotation not working and other strange things


Go to solution Solved by Josh,

Recommended Posts

Posted

I'm having problems with my game.

I have a vec3 defined for rotation of my character but no rotation takes place. If I print the values for it I get very small values like 0.06.

image.thumb.png.86399dc6ec55b3d0f99418915aa6fce2.png

The script is based off the mover script that comes with Leadwerks.

I've removed most of my other code to show the problem that is happening.

You can see in the screenshot that the rotation value is 5 around the Y axis but the print return a group of small numbers.

Another thing is that the Vec3 for speed doesn't expose in the editor properly but works fine in game.

I will PM you the project so you can have a closer look.

 

  • 2 weeks later...
  • Solution
Posted

I am confused about the expected behavior here. Declaring a Vec3 value called "rotation" on the script table will not rotate the entity. The way you would do this in code is like this:

function Sheep:Start()
	self:SetRotation(0,5,0)
end
Quote

Another thing is that the Vec3 for speed doesn't expose in the editor properly but works fine in game.

Velocity is not available in the entity properties interface because it would be very rarely used, and there are already a lot of physics properties to display.

Let's build cool stuff and have fun. :)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...