impoint issue: setPosition in a addNewPositionCallback function
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
Hi
Is there a way to use setPoint in a addNewPositionCallback function. I want to reallocate a draggable point (setting dynamic restrictions) so that the impoint is restricted for example to a certain slope movement, or attached to a certain curve.
This is the general idea, where BaP is a global array of imPoints and B2Ba is an angle:
addNewPositionCallback(BaP(2),@Interact);
function Interact(Pos)
global BaP B2Ba
P=getPosition(BaP(1));
setPosition(BaP(2),[Pos(1,1) P(1,2)-Pos(1,1)*tan(B2Ba)]);
But it doesn't get repositioned as i wanted. Checking the impoint object, the property insideSetPoint is not letting me change the current position further using setPosition. Is there a workaround for this? Or any way of getting the desired behaviour?
0 Commenti
Risposte (0)
Vedere anche
Categorie
Scopri di più su Simulink Environment Customization in Help Center e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!