Skip to content
Discussion options

You must be logged in to vote

of course. you can use lerp. for this to work you need useframe and you need a mutable data representation.

here's an example: https://codesandbox.io/s/instanced-vertex-colors-8fo01?file=/src/index.js

your code seems way too complex. you dont need to raycast, events are inbuilt in r3f and you can have them on instanced meshes as well. you get the INDEX of the instance in the event data as "instanceId"

Replies: 1 comment 3 replies

Comment options

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

@drcmda
Comment options

@marcelpi
Comment options

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