aspect2d

I want to create an orthographic world with collisions, but I’m having the problem that aspect2d scales the world, and when you use non-uniform scaling on a CollisionSolid, it behaves erratically.

render2d works perfectly, but everything looks stretched.

What other options are there?

Howard Braham
ETC First-Year

You could scale the camera, or the film size, instead of the world.

If your intention is that the entire world be orthographic, I’d recommend replacing the lens in the default camera:

lens = OrthographicLens()
lens.setFilmSize(13.333, 10) # or whatever size you need for your app
base.camNode.setLens(lens)

Then you can put your orthographic scene under render and manipulate camera in the usual way, and save aspect2d (and render2d) for GUI objects, as they are intended.

David

Sorry to hijack the thread a little, whats the difference between aspect2d/render2d and the aspect2dp/render2dp?

render2dp is used only for very special cases, when you need an auxiliary 2-d scene graph layered on top of the existing one. Normally, you wouldn’t need to mess with it; render2d/aspect2d will serve all of your GUI needs.

David

1 Like