0
$\begingroup$

at first I'll link a video of the effect I am reffering to in the title.

In this video if you skip to 03:40 - 04:00 and to 05:00 - 05:30 you can see two different visualizations of the effect I want to accomplish.

Considering the effect visualized in 03:40 - 04:00, what I did in the past was to add an object everytime I right-clicked my mouse over the navmesh in the hitPosition. That object had the mesh of those arrows(animated) and had a lifespan along with logic bricks that made the player follow those newly-created objects. The problem with this idea though was that the time the player took to travel from his current position to the arrows(cursor) was different every time but the lifespan was fixed. I had many problems with this way I was trying to create this effect and I abandoned it.

Untill I saw this effect in 05:00 - 05:30. This is exactly what I wanted to do. Most new games with isometric or nearly-isometric cameras have this "player to cursor" motion where the player travels to cursor when right-click mouse is pressed and stop travelling when not.

What's the best way to achieve this in blender GE? I will still have my navmesh to stop the player from getting to some areas.

$\endgroup$

1 Answer 1

0
$\begingroup$

I would not remove the "target" object. Just let it there. You need just one.

You can activate/deactivate the steering (rather then adding/removing the target object).

To do this you need to sense the events when to do what.

Unfortunately you did not say what you want to get. You just mention what other games are doing.

"player to cursor" motion where the player travels to cursor when right-click mouse is pressed and stop travelling when not

right mouse button sensor -> AND -> steering actuator

This activates the steering on when pressing the right mouse button, and deactivates the steering when releasing the button.

You also need to think about when to place the target object at the hit position under the cursor. Typically you do that once at right mouse button.

You can continuously do that while holding the right mouse button too (be aware the situation when the cursor is over a non-targetable position).

$\endgroup$
2
  • $\begingroup$ Followed your advice about not removing the object and your steering SCA logic. I got only one question. Would you enable true level triggering in the right mouse button sensor? If I do it works better and strangely enough If I don't I get high gpu latency for reasons that I don't get. $\endgroup$
    – Lev
    Mar 10, 2017 at 15:01
  • $\begingroup$ You need true level triggering only to constantly place the target when you hold down the button. The steering will work as long as the actuator is activated. It will not care any subsequent activation signals from any controller. (Placing the target and activating/deactivating the steering are two different operations regardless if they are results of the same event (mouse click). $\endgroup$
    – Monster
    Mar 13, 2017 at 6:16

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .