Duckocide's Recent Forum Activity

  • Thanks R0J0hound and 7Soul. I shall give this a go. I didn't realise multiple inheritance was possible, neat :)

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I've only just got in to construct...

    If you tuck the objects position (self.X and self.Y) in to some new object instance variables (lastX and lastY), you could do a comparision (before you tuck them away) and see if the amount of change is small enough to warrant end of movement. Not sure how construct handles floating point numbers, but if the expression round(self.X-self.lastX)+round(self.Y-self.lastY) == 0 it has come to rest.

  • Hi

    I've written some game animation that uses very simple 3D transformations. Nothing too complex...

    position.X =((x*perspective)/z)+screencentreX

    position.Y =((y*perspective)/z)+screencentreY

    (where x,y,z, etc are object instance variables)

    Now, I would like to loop through the objects (I'm using a family called 3DSprite) and using math, see if any of the 3D objects are overalapping each other in 3D space (everything is a sphere, so the math is a simple distance to center of both 3D objects being less than sum of object radius). Note all 3D vector, radius and calculated 2D screen position values are held in family in instance variables for reference.

    I'm getting my self tied in knots. I can't seem to see to find an easy way to "nested loop" through all the 3DSprite family objects. To my mind it's a loop (A) through the object family followed (sub event?) loop (B) through the objects again. Then, comparing (A) instances variables with (B) variables if (A) object != (B) objects.

    Any help greatly appreciated. Once I crack this, then 3D collision math is easy and I can blend 2D with a nice 3D animation :)

Duckocide's avatar

Duckocide

Member since 24 Mar, 2012

None one is following Duckocide yet!

Connect with Duckocide

Trophy Case

  • 12-Year Club
  • Email Verified

Progress

13/44
How to earn trophies