Home › Forums › Puzzles › Keyboard Events unresponsive after double tapping key event input/function
- This topic has 67 replies, 2 voices, and was last updated 1 year, 2 months ago by
c4cc.
-
AuthorPosts
-
2023-10-03 at 5:33 pm #67272
c4ccCustomerFor context: I was trying to get a character to turn around when certain keys were tapped rapidly twice:
Key events are responsive before that quick double tapping event,
but after I double tap keyD (turning left to right), key events are now unresponsive. So how do I
get key events to be responsive?FPS trialproduct 20.9.25 https://postimg.cc/gallery/LMM5vkQ/af43346e
2023-10-03 at 7:52 pm #67282kdv
ParticipantAfter animated rotating from 180 to 360 the actual final angle is somewhere around
-1.4033418597069752e-14which is not equal to0. That’s very-very close but not equal to zero.
Use this puzzle to round-1.4033418597069752e-14to zero
https://www.soft8soft.com/docs/manual/en/puzzles/Numbers.html#roundOr rotate from 180 to 0 instead of 360.

Puzzles and JS coding. Fast and expensive.
If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of the meaning at all.
2023-10-04 at 3:57 am #67284
c4ccCustomerOr rotate from 180 to 0 instead of 360.
Thanks, this indeed worked. But I’d prefer my character to face the player when turning.
Use this puzzle to round -1.4033418597069752e-14 to zero
Which part of the puzzles do I put this in?
FPS trialproduct 20.9.25 https://postimg.cc/gallery/LMM5vkQ/af43346e
2023-10-04 at 4:15 am #67287kdv
ParticipantWhich part of the puzzles do I put this in?

But I’d prefer my character to face the player when turning.
Rotate from 0° to -180° and from -180° to 0°
In Verge3D valid angles are in the range -180°…180°. Angles out of this range don’t exist and a special formula recalculates them to be within the range. For example, if you rotate your object from 0° to 240° the final angle will be -120°.Puzzles and JS coding. Fast and expensive.
If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of the meaning at all.
2023-10-04 at 9:14 am #67289
c4ccCustomerThis worked, thanks.
(note:, apply this to “Player movement – left to right: every frame – do“)Rotate from 0° to -180° and from -180° to 0°
In Verge3D valid angles are in the range -180°…180°. Angles out of this range don’t exist and a special formula recalculates them to be within the range. For example, if you rotate your object from 0° to 240° the final angle will be -120°.I tried this, but my character got stuck after rotating once, and can only move up and down.
FPS trialproduct 20.9.25 https://postimg.cc/gallery/LMM5vkQ/af43346e
2023-10-04 at 1:34 pm #67293kdv
ParticipantUse debugging to find the reason which is very simple.
Puzzles and JS coding. Fast and expensive.
If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of the meaning at all.
2023-10-04 at 3:36 pm #67296
c4ccCustomer2023-10-04 at 4:13 pm #67297kdv
ParticipantThat was a bad try. Senseless. Think more. You should read an object’s rotation at the end of an animation but not an object’s name.
Puzzles and JS coding. Fast and expensive.
If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of the meaning at all.
2023-10-04 at 4:34 pm #67298
c4ccCustomer2023-10-04 at 4:44 pm #67299kdv
ParticipantBad try. Wrong place.
Puzzles and JS coding. Fast and expensive.
If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of the meaning at all.
2023-10-04 at 5:08 pm #67300
c4ccCustomer2023-10-04 at 5:15 pm #67301kdv
Participant
Is
-180equal to180?Puzzles and JS coding. Fast and expensive.
If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of the meaning at all.
2023-10-04 at 5:28 pm #67303
c4ccCustomer
Is
-180equal to180?No, it isn’t. So if I want my character to spin facing the player/screen, via rotating from 0° to -180° and from -180° to 0°, how do I do this?
FPS trialproduct 20.9.25 https://postimg.cc/gallery/LMM5vkQ/af43346e
2023-10-04 at 5:29 pm #67304kdv
ParticipantThink.
Puzzles and JS coding. Fast and expensive.
If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of the meaning at all.
2023-10-04 at 5:51 pm #67305
c4ccCustomerProblem is, we can’t just put negative into the degrees number puzzles
FPS trialproduct 20.9.25 https://postimg.cc/gallery/LMM5vkQ/af43346e
-
AuthorPosts
- You must be logged in to reply to this topic.













