Rotating colliders

Chipmunk2D Bindings for the Unity3D engine
Post Reply
pezbucca
Posts: 1
Joined: Wed Aug 21, 2013 5:50 am
Contact:

Rotating colliders

Post by pezbucca »

Hello,

I have recently bought a Chipmunk2D Unity licence and I quite new to the API so I am wondering if it is possible to rotate the Chipmunk colliders in 3D space?

I am prototyping a game that is based in a 3D world but with orthogonal camera views to give an illusion of 2D. When the camera rotates 90 degrees on the Y axis, I need to move the colliders too so their X and Y coordinates are changed. I tried rotate the cube that holds the box collider but it seems to have no effect.
User avatar
Roland
Posts: 16
Joined: Thu Aug 08, 2013 3:32 pm
Contact:

Re: Rotating colliders

Post by Roland »

Hello sir or madame but probably sir,

I'm guessing you've most likely already found your answer on your own, but I'll chime in anyways for no good reason. I'm also new to Chipmunk but I've been working with Unity for over a year now (strictly amateur). From what I've seen with Chipmunk you probably won't be able to get what you're going for directly functioning in the way you're intending. I'm pretty sure Chipmunk communicates between Unity's 3D coordinate system and its own 2D world by directly correlating the XY coordinates between the two. It'll actually update an object's location/orientation in the 3D world to match its simulation each fixed timestep, overriding any other rotation (or translation for that matter, though scaling it does seem to be able to handle) that you might try to make outside its system, as you've already pointed out having noticed.

So you'll have to get incredibly creative to get the effect you're describing. Depending on your requirements you could probably manage something by filtering Chipmunk's collisions properly, enabling/disabling their Chipmunk components and updating their positions in the simulation, etc. Might need texture rendering capabilities depending on what you need (which I'm pretty sure requires Unity Pro). At that point you *might* just be better off using PhysX :(, since it's already in 3D. Just my vague impressions though, I'm sure the devs could give you a better response.

I'm curious to better understand what you're after though. Something like FEZ?
User avatar
slembcke
Site Admin
Posts: 4166
Joined: Tue Aug 14, 2007 7:13 pm
Contact:

Re: Rotating colliders

Post by slembcke »

So this is something we've been mulling over for a while. Implementing it for the runtime loop is easy enough, its changing all the editor and gizmo code that would a pain. It's definitely still something we are thinking about though since it's been requested multiple times.
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
Post Reply

Who is online

Users browsing this forum: No registered users and 7 guests