-
-
Notifications
You must be signed in to change notification settings - Fork 977
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] Base spline support #1287
base: master
Are you sure you want to change the base?
Conversation
# Conflicts: # sources/engine/Stride.Engine/Engine/Splines/Components/SplineComponent.cs # sources/engine/Stride.Engine/Engine/Splines/Components/SplineNodeComponent.cs # sources/engine/Stride.Engine/Engine/Splines/Components/SplineTravellerComponent.cs
…decorator # Conflicts: # sources/engine/Stride.Engine/Engine/Splines/Models/SplineNode.cs
…nePR+mesh+decorator
…nePR+mesh+decorator
DestroySplineRenderer(null, entity); | ||
component.Spline.OnSplineDirty -= data.OnSplineDirtyAction; | ||
entity.Transform.PostOperations.Remove(data.TransformOperation); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably better to add splineComponentsToUpdate.Remove(component)
in case it gets added and removed without a frame running in between (it can happen if components are manually removed after a load, etc.)
{ | ||
component.SplineComponent.Spline.OnSplineDirty -= data.OnSplineDirtyAction; | ||
entity.Transform.PostOperations.Remove(data.TransformOperation); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing splineTraverserComponents.Remove()
PR Details
This PR contains basic support for creating splines and visualizing those splines.
Motivation and Context
Splines are useful for camera paths, or any other object that requires bezier curve for movement, generating geometry and for distributing geometry (see prototype video). This first PR should cover the creation and editing of the spline.
Description
(outdate, should make a new one)
For a full overview see this video which is specifically recorded for this PR:
https://youtu.be/auLS9RObIXY
Demo project: https://github.com/Aggror/SplineTools/tree/Spline-PR-1-demo
A spline entity exists out of SplineNodes (also entities) which are its children. These can be created entirely by code if so desired. To make them slightly more user friendly, these objects are utilised in components so that an editor user can view them inside the editor.
Some details
Spline traverser
An entity with a reference to the spline, can traverse the spline. A basic Spline traverser component has been added that support moving forward and backwards along the spline.
Types of changes
Checklist