We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.

Get Intersecting objects’ dimensions?

Home Forums Puzzles Get Intersecting objects’ dimensions?

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #80107
    c4cc
    Participant

    First 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

    ol4x1

    Relevant puzzles
    ol4x1

    Yet get object dimension puzzles does not work here?
    ol4x1

    or here?
    ol4x1

    Zip app here
    https://drive.google.com/file/d/1HnzuBNS6x-0kh4NU5J1evnu3FFr-jU62/view

    #80121
    kdv
    Participant

    Yet 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? :scratch:

    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.

    #80122
    c4cc
    Participant

    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…

    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? :scratch:

    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

    #80123
    c4cc
    Participant

    Imagine 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

    #80189
    kdv
    Participant

    I’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.

    #80190
    c4cc
    Participant

    Need 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.

    l41

    #80191
    kdv
    Participant

    Tried but sadly

    *facepalm* a remainder of a vector divided by a number? :wacko: 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.

    #80192
    c4cc
    Participant

    This 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.

    l41

    my puzzles:

    l41

    Also, at .20 in your video, the shot whizzes over your red cube…

    l41

    whereas in mine, if I’m extremely close to, but not touching the shot, it vanishes

    l41

    • This reply was modified 4 weeks, 1 day ago by c4cc.
Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.