Recent content by Vold

  1. V

    Two-Dimensional Collision With Two Moving Objects

    I managed to get it right with your input. I will now try to solve other problems related to it. The objects sometimes get stuck as you say, regardless, I am planning to have some animations that allow me to simulate some kind of 3D effect where if an object collides it can either go up or down...
  2. V

    Two-Dimensional Collision With Two Moving Objects

    public void collisions(LinkedList<GameObject> gameObjects){ //Declaration of the final velocity values of //the loop. for(int i = 0; i < gameObjects.size(); i++){ for (int j = i+1; j < gameObjects.size(); j++){...
  3. V

    Comp Sci 2D collision detection / determining final velocity - Java

    Scratch the last code it was a mess. theta and phi use Math.atan now. /** * * @return theta: the angle of the direction of the object with the X axis. * currently the conditions are only useful to prevent Y/0 division (pretty sure it * does not use the best solution to it...
  4. V

    Two-Dimensional Collision With Two Moving Objects

    Thanks a lot for your help. I have corrected the equation based on what you have suggested, I just have to find the correct angles to make the objects bounce. I have a few questions: 1. Do I have to use the same phi for both objects?(pretty sure I have to). 2. theta2 = (PI + "theta2") In...
  5. V

    Comp Sci 2D collision detection / determining final velocity - Java

    Indeed, I was planning to add a condition so that collisions can only be checked within the frame, to prevent that. However, this should not cause problems when their positions are +x, and +y, isn't it?(unless that 2 objects enter the frame on top of each other, but that's another issue) I...
  6. V

    Comp Sci 2D collision detection / determining final velocity - Java

    Homework Statement Determine if two circular objects (both moving or one stationary), collide and if so, determine their final velocity. The two objects are being rendered using Graphics's Java library class, updating their position 60 times per second. Their position (x,y) is determined based...
  7. V

    Two-Dimensional Collision With Two Moving Objects

    I've got those equations on this website, also on wikipedia. :P Anyways, here is what I am trying to do, I hope you can help me with it. I'm trying to program with Java, a small 2D game (just for fun and learning) in which I use circles as objects with certain radius which move with a speed...
  8. V

    Two-Dimensional Collision With Two Moving Objects

    Homework Statement [/B] Two moving objects (circle shaped) with a known mass, move in a 2D plane with a known constant direction and speed, at certain point, objects collide with each other (elastic). At that point, the coordinates of the center each object is known, their radius is also known...
Back
Top