FPS config

26 April 2017 12:51
Hi there:

I've been taking a look at the fps module included in the api and I have come up with a couple of questions. How do you change the behaviour of the shift key to do the opositte, run when pressed and walk without it being pressed? How do you use the motion_cb rewrite? Do you completely rewrite the motion_cb or do you add the funcionalities you need after the default callback is called?

It seems the fps module can be helpful, mainly with the compatibility across browsers and different platforms but you should at least update the fps tutorial in the blog to let people understand the basics.
28 April 2017 10:39
Hello

How do you change the behaviour of the shift key to do the opositte, run when pressed and walk without it being pressed?

You can change the Run Speed, it will be used when the shift button is pressed.

How do you use the motion_cb rewrite? Do you completely rewrite the motion_cb or do you add the funcionalities you need after the default callback is called?

motion_cb rewrite? We do not rewrite this callback. It's called when one of the movement buttons is pressed. It helps us to detect the direction of character movement.
18 May 2017 21:37
Hello again:

I keep trying with the fps module. I've been setting up an scenery, which has been very interesting, configuring the lens flare, day time and all that is really easy with the api options, great work. The sea is still half the way as it is a pretty complex setup to understand, up to now I have had good results with the normal maps and the foam, now I'm gonna try to understand how the coastline works, I stil haven't get it. If you have any hint it will be welcome.

The tree setup with the wind system is great, too. I have only found a bit of problems in the vertex painting as it would left some of the vertex static and the mesh of the trunk would mess up. Repainting the vertex I got a better result but still need to get better at that. Anyway it is very convincing the wind setup and all that.

But, now I'm starting with the animations of the character, I'm not sure which is the best approach to bind the animations to the character physics object. Would adding a new action to the key with a callback to call the exported skeletal animation be a good approach? I don´t see how to modify the default states of the character to apply the corresponding animations: walk, run…

If you can help me with this I will be grateful.
Thank you
 
Please register or log in to leave a reply.