Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

How do you use vec3 with physics.body?

edited June 2012 in Questions Posts: 6

Can you redefine the physics.body to accept vec3s as definng parameters. Everything physics related seems to be limited to vec2s



  • edited June 2012 Posts: 580

    That's because under the hood Codea uses Box2D, which, as the name states, is a 2D physics engine. I suppose they could overload the methods to also take a vec3 and ignore the z component, but it seems unnecessary and confusing since a) it is a very uncommon use case and b) it would imply that the physics engine actually does something with the z component. It's pretty simple to just convert your vec3s to vec2s when passing them to physics methods.

Sign In or Register to comment.