[SOLVED] 3D camera jumping/ not fluid

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
User avatar
Kinmoku
Veteran
Posts: 447
Joined: Mon Aug 11, 2014 9:39 am
Completed: One Night Stand
Projects: Love IRL, Memories
Tumblr: gamesbykinmoku
itch: kinmoku
Location: Germany
Contact:

[SOLVED] 3D camera jumping/ not fluid

#1 Post by Kinmoku » Thu Oct 17, 2019 8:42 am

Hi all,

I'm using the 3D camera (viewtopic.php?f=8&t=29778&start=45) and it's going well, but I'm having an issue... When I move the camera for the first animation, it's as though the co-ordinates aren't quite right.

Here's my code:

Code: Select all

    $ layer_move("background", 2000)
    $ layer_move("middle", 1860)
    $ layer_move("forward", 1720)
    $camera_move(0, 0, 0, 0, duration=0)
    
    scene tree_climb_bg onlayer background:
        xpos 0.5 ypos 1.04 xanchor 0.5 yanchor 1.0 zoom 1.09
    show treehouse_up_base onlayer middle:
        xpos 0.76 ypos 0.86 xanchor 0.5 yanchor 1.0
    show tree_up onlayer forward
    show treehouse_up_window onlayer background:
        xpos 0.71 ypos 0.51 xanchor 0.5 yanchor 1.0 
    with dissolve
    
    m "I must have been thirteen or fourteen when I last climbed up here."
    
    # she climbs
    $all_moves(camera_check_points={u'y': [(0, 0, None), (-709, 0.73, u'linear'), (-266, 0.88, u'linear')], u'x': [(0, 0.0, u'linear'), (1092, 0.88, u'linear')], u'z': [(0, 0, None), (273, 0.88, u'linear')], u'rotate': [(0, 0, None), (3, 0.88, u'linear')]}) ## this animation has 3 keyframes: start, climb higher, drop down end. This is the one with the jump problem.
  
    m "Oof..."
    k "Hurry up!" with hpunch
    
    $all_moves(camera_check_points={u'y': [(-266, 0, None), (-1941, 2.50, u'linear')], u'x': [(1092, 0, None), (3284, 2.50, u'linear')], u'z': [(273, 0, None), (789, 2.50, u'linear')], u'rotate': [(3, 0, None), (8, 2.50, u'linear')]})     ## this animation has 2 keyframes: start (same numbers as previous "drop down end") and climb even higher. This one works.

    
The second $all_moves animation works but the first one jumps. The background images (tree_climb_bg and treehouse_up_window) seem to be causing the issue. It's like they aren\t aligned properly, even though I set up everything before ($camera_move(0, 0, 0, 0, duration=0))

Has anyone had issues like this with the 3D camera? I've double checked over my co-ords in the 3D camera plugin and they line up.

Weirdly, if I go back, open up the plugin and continue, the bug goes away and it's smooth as it should be. Maybe I haven't set up the images correctly? :?
Last edited by Kinmoku on Thu Oct 17, 2019 8:46 am, edited 1 time in total.

User avatar
Kinmoku
Veteran
Posts: 447
Joined: Mon Aug 11, 2014 9:39 am
Completed: One Night Stand
Projects: Love IRL, Memories
Tumblr: gamesbykinmoku
itch: kinmoku
Location: Germany
Contact:

Re: 3D camera jumping/ not fluid

#2 Post by Kinmoku » Thu Oct 17, 2019 8:45 am

Wow, so... After testing it all morning, I wrote this post, then A MINUTE later, I tried something and it fixed it!

Change...

Code: Select all

scene tree_climb_bg onlayer background:
        xpos 0.5 ypos 1.04 xanchor 0.5 yanchor 1.0 zoom 1.09
to...

Code: Select all

show tree_climb_bg onlayer background:
        xpos 0.5 ypos 1.04 xanchor 0.5 yanchor 1.0 zoom 1.09
... in case anyone else has trouble with this!

Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot]