[SOLVED]Viewport Transform giving weird resuts. Need a fresh set of eyes.

Started by
10 comments, last by Postie 12 years, 1 month ago
BAH!

Solved it. Apparently my World Matrix wasn't properly getting set. Changed it to the following and it started working:


Matrix world = new Matrix();
world = SlimDX.Matrix.Identity;
SlimDX.Matrix.Translation(ref position, out world);


No idea why that vs just calling SlimDX.Matrix.Translation(<some vector3>) didn't work.
Advertisement
Hmm that doesn't make sense, you're creating a new empty matrix, then replacing that with an identity matrix, then replacing that with a new translation matrix built from the position vector.

For the sake of my sanity, could you verify that changing that code (and only that code) back to something akin to: Matrix world = SlimDX.Matrix.Translation(position); makes the problem come back? I use SlimDX.Matrix.Translation() all the time, and if there's the potential for some odd behavior with it I'd really like to know.
[size="2"]Currently working on an open world survival RPG - For info check out my Development blog:[size="2"] ByteWrangler

This topic is closed to new replies.

Advertisement