Z Depth Expression

This forum is currently in read-only mode.
From the Asset Store
A very simple to set up ZElevation based depth of field system for your game. Fully commented.
  • Hello I'm trying to do a space shooter 3D, I'm for 4-5 hours looking here and there, but I don't found anything.

    What I need I think is simple for who's understand math.

    An expression to move the depth of a 3d model slightly.

    <img src="http://dl.dropbox.com/u/31568350/Screen1.jpg" border="0" />

    This is the image, I think the rest I can handle with them.

    But the simple thing as math always stucks me, LOL.

    Thanks by now.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Here's a basic solution(i'm assuming you mean the z position?)

    Your 3d object has a setting > Properties > Settings > Z (underneath Depth)

    This will propably set at zero, unless you have already changed it.

    Give your 3d obect a private variable called 'zpos', and set its value to the objects initial 'Z' setting.

    + System: Start of layout

    -> 3dthing: Set 'zpos' to 0   (or whatever its currently set at)

    + Button: On Button clicked   (I'm using a button to move it)

    -> 3dthing: Add 10 to 'zpos'

    + System: Always (every tick)

    -> 3dthing: Set Z to 3dthing.Value('zpos')

    So everytime you click the button, the 3d object will move 10 units.

    Hope this helps

    (Nice graphics!)

  • Perfect chrisbrobs!

    In my search I found a tank sim yours! Very good work!

    As my idea was the sky moves not the ship I made some changes using your idea:

    <img src="http://dl.dropbox.com/u/31568350/Screen1_Events.jpg" border="0" />

    This solved!

    Thank you!

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