Moving camera - Operator [HELP]

I have tried for ages to figure out a way to achieve this with my limited knowledge of Defold and i have had no luck.

I’m using [Operator] for [Kinematic Walker] and the character follows the camera. I want the camera to spin left when I click A, right when I click D. This should make the character spin when I hold A or D.

I hope I have explained what I’m trying to achieve well enough.

The Operator script has a manual_control message for exactly that case. A simple example:

if action_id == hash("key_a") then
    msg.post("/operator", "manual_control", { horizontal = -1 })
elseif action_id == hash("key_d") then
    msg.post("/operator", "manual_control", { horizontal = 1 })
end
2 Likes

@JustAPotota is absolutely right, it’s possible by posting manual_control message. Also check the example in the repo.

1 Like