Skip to content

how do i recreate Sonic CD's camera extension in this engine? #172

Answered by NeonSRB2
thefacer asked this question in Q&A
Discussion options

You must be logged in to vote

this code is kinda wierd, so this is a different take without ai
sonic cd's extended camera replaces the horizontal drag margins used in the other classic sonic games.
This is the place to disable that:

	# Camera settings
	get_parent().call_deferred("add_child", (camera))
	camera.enabled = (playerControl == 1)
	var viewSize = get_viewport_rect().size
	camera.drag_left_margin =   camDist.x/viewSize.x # make this 0
	camera.drag_right_margin =  camDist.x/viewSize.x # this too
	camera.drag_top_margin =    camDist.y/viewSize.y
	camera.drag_bottom_margin = camDist.y/viewSize.y

next, is the actual offsetting.
Sonic Worlds Next uses a variable called camAdjust to offset where the camera thinks t…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@fishingrosd113
Comment options

@NeonSRB2
Comment options

Answer selected by thefacer
@fishingrosd113
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants