Jump to content

Search the Community

Showing results for tags 'forward'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • HTML5 Game Coding
    • News
    • Game Showcase
    • Facebook Instant Games
    • Web Gaming Standards
    • Coding and Game Design
    • Paid Promotion (Buy Banner)
  • Frameworks
    • Pixi.js
    • Phaser 3
    • Phaser 2
    • Babylon.js
    • Panda 2
    • melonJS
    • Haxe JS
    • Kiwi.js
  • General
    • General Talk
    • GameMonetize
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered
    • Marketplace (Sell Apps, Websites, Games)

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Twitter


Skype


Location


Interests

Found 2 results

  1. In unity they have transform.forward, right and up. The docs for unity say the forward is : 'The blue axis of the transform in world space.' using UnityEngine; using System.Collections; public class ExampleClass : MonoBehaviour { public float thrust; public Rigidbody rb; void Start() { rb = GetComponent<Rigidbody>(); } void Update() { rb.AddForce(transform.forward * thrust); } } How would I do this in Babylon.... Yo @Deltakosh or ANYBODY How do we get the forward vector in Babylon... Would this work: /** The blue axis of the transform in world space. */ public static GetForwardVector(mesh:AbstractMesh, force?:boolean):BABYLON.Vector3 { var matrix:BABYLON.Matrix = mesh.computeWorldMatrix(force); return BABYLON.Vector3.TransformCoordinates(BABYLON.Vector3.Forward(), matrix); } /** The red axis of the transform in world space. */ public static GetRightVector(mesh:AbstractMesh, force?:boolean):BABYLON.Vector3 { var matrix:BABYLON.Matrix = mesh.computeWorldMatrix(force); return BABYLON.Vector3.TransformCoordinates(BABYLON.Vector3.Right(), matrix); } /** The green axis of the transform in world space. */ public static GetUpVector(mesh:AbstractMesh, force?:boolean):BABYLON.Vector3 { var matrix:BABYLON.Matrix = mesh.computeWorldMatrix(force); return BABYLON.Vector3.TransformCoordinates(BABYLON.Vector3.Up(), matrix); } Also I saw some c++ code for getting forward vector using the quaternion, could I use this in babylon or SHOULD I even try use in Babylon ... Is there something already in Babylon for this: Vector3 Quaternion::GetForwardVector() const { return Vector3( 2 * (x * z + w * y), 2 * (y * x - w * x), 1 - 2 * (x * x + y * y)); } Vector3 Quaternion::GetUpVector() const { return Vector3( 2 * (x * y - w * z), 1 - 2 * (x * x + z * z), 2 * (y * z + w * x)); } Vector3 Quaternion::GetRightVector() const { return Vector3( 1 - 2 * (y * y + z * z), 2 * (x * y + w * z), 2 * (x * z - w * y)); } Or am I way off
  2. Hi guys, for my game i use a emitter (game.add.emitter) for a snowing weather effect. When i start the state the emitter starts as well. So it looks like it has just started to snow right at the moment the player starts the game. Is it possible to advance the emitter progress. So it looks like the emitter does its work for a while? thanks Tom
×
×
  • Create New...