Skip to content

Jak 2/3 - Path Editor#166

Open
Nick0778 wants to merge 1 commit into
OpenGOAL-Mods:mainfrom
Nick0778:j2/3-path-editor
Open

Jak 2/3 - Path Editor#166
Nick0778 wants to merge 1 commit into
OpenGOAL-Mods:mainfrom
Nick0778:j2/3-path-editor

Conversation

@Nick0778

Copy link
Copy Markdown
Contributor

This PR implements a simple in-game path editor, allowing people to create linear and curved paths, as well as export them in the jsonc format, including the path and path-k lumps. Very useful for people who prefer placing paths directly in-game instead of using 3D modeling softwares.

Quick showcase (sorry for the video quality :( )

path-editor.mp4

Example of the path output:

png1

@dallmeyer dallmeyer left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

overall looks great, left a couple thoughts

(debug-menu-append-item path-editor-menu (new-dm-submenu "Path Type" select-path-type-menu))
)
(debug-menu-append-item path-editor-menu (new-dm-func "Clear All" #f nick-path-menu-check-clear-all)) ;; clear all the path
(debug-menu-append-item path-editor-menu (new-dm-func "Print Path Data" #f nick-path-menu-print-jsonc-path-data)) ;; print path data

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it might be nice to also have options for saving/loading from file, its something I added to the orb placer tool (though I think I still need to contribute it back to modbase)

;; and when the last node is selected
;; or when there's nothing selected
(when (and (< idx 100) (or (= selected last-idx) (= selected -1)))
(vector-copy! (-> this nodes idx) (target-pos 0))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how does it look if you turn target off and switch to freecam? I think target-pos might return the camera's position in that case which could be a little weird.

might want to add a slight offset if target isn't spawned, I do that for orb-placer as well

;; shift orb's position with camera angle, by 3m
(vector+! vec vec (vector-normalize! camera-z-vector (meters 3.0)))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants