How do I correct the position of my objects?

0 favourites
  • 11 posts
From the Asset Store
Hand-painted tiles, objects, animated objects, and background to build a colorful Mayan civilization environment.
  • Hi all!

    I previously sought help for this issue with no luck, so I'm trying again with a bit more information. The object in my game (key) should be up and around the left wall you see ahead of the player. Instead, the key is basically attached to the player and moves with her. Any suggestions on how to fix this?

    Many thanks!

    Subscribe to Construct videos now
  • Anyone? I'm really struggling here. I've tried pinning it to specific locations, playing with visibility and animation settings, moving it on the layers/layout, everything. It's now really my only roadblock to being able to complete a first person adventure/puzzle game and I really would love to be able to make it work!

  • As a quick update, I've successfully made the object disappear until the player rounds the corner and the ray hits the 2d object on the 2d layer, thus making the 3d object appear on the 3d layer. Unfortunately, instead of staying put at that time, the object still moves with the player before disappearing once the ray is no longer on the 2d object rather than allowing the player to collide with the object (in the 2d and/or 3d layers) so that the player can collect the item. So I'm a little bit closer but still not quite there. Again, any help would be greatly appreciated!

  • Based on the information given in the screenshot, I wouldn't even know where to start looking in to the problem. It may be the same for others, so that's why no one is replying.

    How are you determining the positions of objects and projecting them in 3d, and what are you doing differently with the key compared to say a wall so that it doesn't behave like you expect it to?

  • The walls are an animation- 256 vertical slices that, upon raycasting, project a wall. The key is a sprite more similar to the player, except that it has no animation at all. I have a 2d layout which has a 2d layer and a 3d layer and I have a 3d layout. Anything generated in the 2d layer is auto generated in the 3d layer and layout in “3d” form (obviously none of it is 3d). The objects seen in game are the “3d” versions and are set to the image point of the 2d counterpart in the 2d layer.

  • That makes sense. Again so what are you doing differently with the key compared to the walls as far as position and projection go?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • The only thing that's different is that I'm not cutting the key up into 256 slices to show one image. It's just the key. The wall is a straight blue line on the 2d layer, but when the ray hits it, it's an animation that sweeps through those slices. If I do that with the key though, it makes the key the size of the wall.

  • I'm not seeing why you wouldn't have control of the size of the object. Anyways if you try to mix your rendering methods you will run into issues, as you have found. So if you position and display your key the same way you would display a wall, which is working properly, the key should also display properly. If you didn't make the effect yourself maybe you can ask the original creator how to adapt it for smaller objects.

  • I'll give it a shot and see what happens. It's not the width of the "object wall" I'm concerned about, but the height.

  • That might end up working- I'll have to play with it to get it to stop stretching/scrolling the key and adjust the height some, but it's much better than doing it in object format. Thank you so much for your help!!!!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)