- This topic has 7 replies, 2 voices, and was last updated 4 weeks, 1 day ago by
c4cc.
-
AuthorPosts
-
2025-02-07 at 9:38 am #80107
c4cc
ParticipantFirst off, credit of kdv for helping me solve this.
Now, I’m trying to get objects’ dimensions, to determine when an object touches another, the latter will disappear. (The movable object here). I need the moveable object here to vanish when the shot touches its surface, even if slightly
Yet get object dimension puzzles does not work here?
Zip app here
https://drive.google.com/file/d/1HnzuBNS6x-0kh4NU5J1evnu3FFr-jU62/view2025-02-09 at 8:29 pm #80121kdv
ParticipantYet get object dimension puzzles does not work here?
or here?
incompatible puzzles (and wrong logic in your head). it’s not possible to measure distance between a number and an object. it’s not possible to compare a boolean value with a numeric value…
The first puzzle set is working. You just need to replace 0.05 with 0.25. And why are you hiding the player object instead of bullets?
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.
2025-02-10 at 3:41 am #80122c4cc
Participantincompatible puzzles (and wrong logic in your head). it’s not possible to measure distance between a number and an object. it’s not possible to compare a boolean value with a numeric value…
Fair enough
The first puzzle set is working. You just need to replace 0.05 with 0.25. And why are you hiding the player object instead of bullets?
I hid the player object to test if the distance between puzzles were indeed working
I’m trying to get dimensions of an object, to calculate when other objects that comes into contact with said dimensions.
On the other hand, using “distance between” puzzles is inaccurate in determining contact between objects, even if the number for this puzzle is bigger.
The browser game I’m working on has characters of irregular shape you see. Imagine a Blender’s suzanne. Not basic shapes like in the above example. If I use distance between puzzles, it’s inaccurate to calculate effect if contact unless I get dimensions of both objects
2025-02-10 at 3:50 am #80123c4cc
ParticipantImagine a Blender suzanne in the above example, as playable character. Its origin is at the face middle. Let’s say shots fire and hit it’s ear, but nothing happens, so I increase the “distance between” puzzle number.
if that suzanne moves up to avoid the shot, the damages still applies (even if lesser) because the distance between puzzle still computes damages based on distance between shot and suzanne.
so I need to get dimensions of suzanne to determine if shots do damage or not
2025-02-10 at 12:06 pm #80189kdv
ParticipantI’m trying to get dimensions of an object
~0.258 is a dimension of your cube. That’s where you can use “get dimension” / 2 instead of 0.05
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.
2025-02-10 at 2:28 pm #80190c4cc
ParticipantNeed the shots to disappear if they come into contact with the cube’s dimensions.
~0.258 is a dimension of your cube. That’s where you can use “get dimension” / 2 instead of 0.05
Tried but sadly shot’s don’t disappear even though they touch cube’s dimensions.
2025-02-10 at 3:24 pm #80191kdv
ParticipantTried but sadly
*facepalm* a remainder of a vector divided by a number?
the result will be
NaN
(nothing)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.
2025-02-10 at 4:22 pm #80192c4cc
ParticipantThis works, thanks. I’m just trying to make my puzzles accurate as yours.
Btw, what size is your shots? mine’s are 0.2 for x, y, z dimensions.
my puzzles:
Also, at .20 in your video, the shot whizzes over your red cube…
whereas in mine, if I’m extremely close to, but not touching the shot, it vanishes
-
This reply was modified 4 weeks, 1 day ago by
c4cc.
-
This reply was modified 4 weeks, 1 day ago by
-
AuthorPosts
- You must be logged in to reply to this topic.