Difficulty in creating new abilities

Yazou

New member
I ask a lot of questions, I'm sorry, I can't find the answers in the forum which implies that I'm the first one to be blocked on these subjects, I must be particularly bad, I beg you to believe me that I'm trying as much as possible to get out of it alone.

Why Object Detection is is not accurate ? I guess you have to set it with Cast Offset but it seems difficult blindly.

In my script in public override void Update() i have if (Input.GetKeyDown(KeyCode.Mouse0) . But it doesn't work very well, the inputs are rarely taken into account, why?
Using AbilityStopped it works fine using ButtonToggle to put my object down, but I'd like to be able to press another input to throw it away.
 

Attachments

  • Capture d'écran 2024-01-17 212204.png
    Capture d'écran 2024-01-17 212204.png
    47.5 KB · Views: 4
  • Raycast is not accurate.png
    Raycast is not accurate.png
    112.9 KB · Views: 4
  • AbilityStopped.png
    AbilityStopped.png
    30.7 KB · Views: 4
Why Object Detection is is not accurate ? I guess you have to set it with Cast Offset but it seems difficult blindly.
Yes, using an offset makes sense. You could add a Debug.DrawLine to the raycast code to determine where it is pointing. With that said, I'll add this as a debug option to the next update.

In my script in public override void Update() i have if (Input.GetKeyDown(KeyCode.Mouse0) . But it doesn't work very well, the inputs are rarely taken into account, why?
The controller is updated within FixedUpdate. Instead take a look at the jump ability for an example of input handling with the ActiveInputEvent.
 
Top