Skip to main content
replaced http://farm7.staticflickr.com/ with https://farm7.staticflickr.com/
Source Link

I am creating a game using Box2D (Javascript implementation) - and I added the ability to have a static platform, that is moved along an axis as a function of a sine.

My problem is when the player lands on the platform, as the platform moves along the X axis - the player is not moved along with it, as you visually would expect.

The player can land on the object, and if it hits the side of the object, it does colide with it and is pushed.

This image might explain better than I did:
After jumping on to the red platform the player character will fall off as the platform moves to the right

example http://farm7.staticflickr.com/6145/5969094999_c9b292d22f_z.jpgexample

UPDATE:
Here is a live demo showing the problem:
http://onedayitwillmake.com/ChuClone/slideexample.php

I am creating a game using Box2D (Javascript implementation) - and I added the ability to have a static platform, that is moved along an axis as a function of a sine.

My problem is when the player lands on the platform, as the platform moves along the X axis - the player is not moved along with it, as you visually would expect.

The player can land on the object, and if it hits the side of the object, it does colide with it and is pushed.

This image might explain better than I did:
After jumping on to the red platform the player character will fall off as the platform moves to the right

example http://farm7.staticflickr.com/6145/5969094999_c9b292d22f_z.jpg

UPDATE:
Here is a live demo showing the problem:
http://onedayitwillmake.com/ChuClone/slideexample.php

I am creating a game using Box2D (Javascript implementation) - and I added the ability to have a static platform, that is moved along an axis as a function of a sine.

My problem is when the player lands on the platform, as the platform moves along the X axis - the player is not moved along with it, as you visually would expect.

The player can land on the object, and if it hits the side of the object, it does colide with it and is pushed.

This image might explain better than I did:
After jumping on to the red platform the player character will fall off as the platform moves to the right

example

UPDATE:
Here is a live demo showing the problem:
http://onedayitwillmake.com/ChuClone/slideexample.php

added 1 characters in body
Source Link
onedayitwillmake
  • 1.2k
  • 1
  • 11
  • 22

I am creating a game using Box2D (Javascript implementation) - and I added the ability to have a static platform, that is moved along an axis as a function of a sine.

My problem is when the player lands on the platform, as the platform moves along the X axis - the player is not moved along with it, as you visually would expect.

The player can land on the object, and if it hits the side of the object, it does colide with it and is pushed.

This image might explain better than I did:
After jumping on to the red platform the player character will fall off as the platform moves to the right

example http://farm7.static.flickr.com/6136/5962208409_8d492aa3a6.jpgexample http://farm7.staticflickr.com/6145/5969094999_c9b292d22f_z.jpg

UPDATE:
Here is a live demo showing the problem:
http://onedayitwillmake.com/ChuClone/slideexample.php

I am creating a game using Box2D (Javascript implementation) - and I added the ability to have a static platform, that is moved along an axis as a function of a sine.

My problem is when the player lands on the platform, as the platform moves along the X axis - the player is not moved along with it, as you visually would expect.

The player can land on the object, and if it hits the side of the object, it does colide with it and is pushed.

This image might explain better than I did:
After jumping on to the red platform the player character will fall off as the platform moves to the right

example http://farm7.static.flickr.com/6136/5962208409_8d492aa3a6.jpg

UPDATE:
Here is a live demo showing the problem:
http://onedayitwillmake.com/ChuClone/slideexample.php

I am creating a game using Box2D (Javascript implementation) - and I added the ability to have a static platform, that is moved along an axis as a function of a sine.

My problem is when the player lands on the platform, as the platform moves along the X axis - the player is not moved along with it, as you visually would expect.

The player can land on the object, and if it hits the side of the object, it does colide with it and is pushed.

This image might explain better than I did:
After jumping on to the red platform the player character will fall off as the platform moves to the right

example http://farm7.staticflickr.com/6145/5969094999_c9b292d22f_z.jpg

UPDATE:
Here is a live demo showing the problem:
http://onedayitwillmake.com/ChuClone/slideexample.php

Tweeted twitter.com/#!/StackGameDev/status/94701345415766016
Added link
Source Link
onedayitwillmake
  • 1.2k
  • 1
  • 11
  • 22

I am creating a game using Box2D (Javascript implementation) - and I added the ability to have a static platform, that is moved along an axis as a function of a sine.

My problem is when the player lands on the platform, as the platform moves along the X axis - the player is not moved along with it, as you visually would expect.

The player can land on the object, and if it hits the side of the object, it does colide with it and is pushed.

This image might explain better than I did:
After jumping on to the red platform the player character will fall off as the platform moves to the right

example http://farm7.static.flickr.com/6136/5962208409_8d492aa3a6.jpg

UPDATE:
Here is a live demo showing the problem:
http://onedayitwillmake.com/ChuClone/slideexample.php

I am creating a game using Box2D (Javascript implementation) - and I added the ability to have a static platform, that is moved along an axis as a function of a sine.

My problem is when the player lands on the platform, as the platform moves along the X axis - the player is not moved along with it, as you visually would expect.

The player can land on the object, and if it hits the side of the object, it does colide with it and is pushed.

This image might explain better than I did:
After jumping on to the red platform the player character will fall off as the platform moves to the right

example http://farm7.static.flickr.com/6136/5962208409_8d492aa3a6.jpg

I am creating a game using Box2D (Javascript implementation) - and I added the ability to have a static platform, that is moved along an axis as a function of a sine.

My problem is when the player lands on the platform, as the platform moves along the X axis - the player is not moved along with it, as you visually would expect.

The player can land on the object, and if it hits the side of the object, it does colide with it and is pushed.

This image might explain better than I did:
After jumping on to the red platform the player character will fall off as the platform moves to the right

example http://farm7.static.flickr.com/6136/5962208409_8d492aa3a6.jpg

UPDATE:
Here is a live demo showing the problem:
http://onedayitwillmake.com/ChuClone/slideexample.php

Source Link
onedayitwillmake
  • 1.2k
  • 1
  • 11
  • 22
Loading