Jump to content

camera.getTranformationMatrix is not a function


coolroar
 Share

Recommended Posts

I need to get frustum planes, but I'm getting getTransformationMatrix error:
camera.getTranformationMatrix is not a function

Playground:             http://playground.babylonjs.com/ts.html#Y0A6Y7

But it does work with my older local babylon.custom.js.

I want to use a newer version that will support BABYLON.VideoRecorder.

I hope there's an easy way to have both BABYLON.VideoRecorder and frustum planes.

 Thanks, Joe
Link to comment
Share on other sites

@Sebavan thanks so much for looking at my ... [blush] ... dumb transcription error ?.

However in my app when I switched

from <script src="static/.../babylon.custom.js"></script>

to <script src="https://preview.babylonjs.com/babylon.js"></script>

I get: "Uncaught TypeError: camera.getTranformationMatrix is not a function"

The "offending" code:

        var fp = camera.getFrontPosition(444);
        var frustumPlanes = BABYLON.Frustum.GetPlanes(camera.getTransformationMatrix());  // !!!!!!!!!!!!
        if (distance__ > 10) { // if "away" from origin established:
            goal__.position = camera.position.add((camera.position.normalizeToNew()).scale(777));
            if (!goal__.isCompletelyInFrustum(frustumPlanes) ) {
           ...

I can't yet see how to minimally reproduce the error in playground.

Until I do, I won't expect any help.

Thanks again!

Link to comment
Share on other sites

ROTFLMAO @myself

I wanted to Record a Scene to a Video so I found http://doc.babylonjs.com/how_to/render_scene_on_a_video.

It did not work with the (old) babylon.custom.js but not knowing that, I tried adding <script src="https://babylonjs.com/inspector/babylonjs.inspector.bundle.js"></script> as the doc page seemed to indicate.

Wrong! that also didn't work, so I swapped old BJS for new.

[ checking some stuff... ] 

OK: in the old BJS.custom it is spelled getTranformationMatrix (missing s).  [ I didn't do it! ? ]

In newer BJS it is spelled getTransformationMatrix (with s)

Sorry about my SNAFU.

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...