BGE Development: Mouse Look Actuator 2

It’s been a while since I’ve posted any updates, I’ve been a rather busy lately. Anyway, here’s what’s changed.

I’ve moved away from having target objects for rotation based on discussion on the BA forums. The idea is that having an actuator that affects only the object it’s attached to fits better with the SCA concept. While it leads to slightly more complex logic brick set ups, it’s less confusing. It’s obvious what objects are being affected.

Based on feedback, I’ve also gone back to my original plan of having local/global coordinate flags for each axis.

I’ve also added a smoothing option. This allows for a much more natural motion and works fanatically in my tests. It works by easing in and out of the rotation by removing a fraction of the total rotation amount each tic and adding a fraction of any change of the mouse position to the total rotation.

oldx = oldx - oldx/smoothing + deltaX/smoothing

All that’s left now is the Python API, getting radians to appear when adjusting the cap and a code tidy. I’m also going to start work on the next part in the tutorial series explaining how to create a mouse look actuator.

Finally, I wanted to say a huge thank you to everyone who has posted ideas, feedback and support. It means a lot to have so much encouragement when starting out in the BGE development.


~ by Jay on April 28, 2012.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: